#!/bin/bash
echo "clean db!!"
rm -rf ./resultdb
echo "start backup 27018 spider resultdb !!"
mongodump -h 127.0.0.1  --port 27018 -d resultdb -o ./resultdb
echo "backup  finished !!"
echo "=================="
echo "restore  27017  starting  !!"
mongorestore -h 127.0.0.1 --port 27017  -d resultdb  --drop ./resultdb/resultdb
echo "restore  mongo finished  !!"
